#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
	//std::stringstream是一个字符串流，即可可以当输入流也可以当输出流
	double d = 12.333;
	stringstream ss1;
	ss1 << d;
	cout << ss1.str() << endl;
	string s = "12,34";
	stringstream ss2(s);//初始化ss
	int a = 0, b = 0;
	ss2 >> a >> b;
	cout << "a:" << a << "  b：" << b << endl;
	cout << ss2.str() << endl;
	cout << a + b;
	//std::getline
	/*string s = "this,is,a,fucker";
	stringstream ss(s);
	while (std::getline(ss, s, ','))
	{
		cout << s << endl;
	}*/

}
